package com.lft.examsys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lft.examsys.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PermissionMapper extends BaseMapper<Permission> {
    List<Permission> getAllPermission();

    List<String> getActivePermissionIdByRoleId(String id);

    boolean addPermission(@Param("role") String role, @Param("permission") String permission);

    boolean isPresent(@Param("role") String role, @Param("permission") String permission);

    boolean removePermission(@Param("role") String role, @Param("permission") String permission);

    List<String> getAllPermissionName();
}
